import java.util.Arrays;
public class testrank {
	public static void main(String[] args) {
		String a[]={"hello","world","welcome","hi","hey"};
		Arrays.sort(a);
		for(int i=0;i<a.length;i++){
			System.out.println(a[i]);
		}
	}
}
